<template>
	<view>

		<!-- <view style="margin: 24rpx 0; ">
			<notice :noticeContent="noticeContent" :xTime='17'></notice>
		</view> -->
		<view class="wrap" style="width: 93%;margin: 0 auto;overflow-y: scroll;">
			<view class="form-des">
				<view class="form-des-msg">
					<view class="form-head2" v-if="allPrice!=0">
						<text style="font-size: 50rpx;">￥</text>
						{{allPrice}}
					</view>
					<view class="form-head1" v-else>
						填写信息获取额度
					</view>
					<view class="form-head1" style="color: #E6E6E6;font-size: 20rpx;">
						*最终额度以最后审批为准
					</view>
				</view>

				<!-- <view class="form-head3">
					<progress :percent="percent" activeColor="#FED48F" :show-info='true' border-radius="10"
						stroke-width="3" />
				</view> -->
			</view>
			<view class="" style="background: #ffffff;border-radius: 50px;">
				<view class="form-list-head dis" :class="closeZcxxAcitve==true?'':'ai'" style="line-height: 50rpx;"
					:style="{ backgroundImage: 'url(' + closeZcxxAcitveBjt + ')',height:closeZcxxAcitveHeight}">
					<view class="form-list-head-msg dis">
						<view class="form-list-head-msg-left">您的资产信息</view>
						<view class="form-list-head-msg-right">（{{list.length}}/{{list.length}}）</view>
					</view>
					<view class="form-list-head-msg-close" @click="closeZcxx()">

						<image style="width: 20rpx;height: 12rpx" v-if="closeZcxxAcitve==true"
							src="@/static/index/icon_xia.png" mode="heightFix"></image>
						<image style="width: 12rpx;height: 20rpx" v-else src="@/static/index/icon_you.png"
							mode="heightFix">
						</image>


					</view>
				</view>
				<view class="" v-if="closeZcxxAcitve">

					<uni-collapse>

						<view class="" v-for="(item,index) in list">

							<uni-collapse-item :title="item.title" :rightTit="item.selectData.title" :name='index'
								disabled :show-arrow="true" :key="index">
								<view class="sfqtag-wrap dis">
									<view class="sfqtag-wrap1" style="" v-for="(items,indexs) in item.content"
										:key="indexs">
										<view class="sfqtag" :class="item.active==indexs?'acctive':''">
											{{items.title}}
										</view>
										<view class="sfqtagImg" v-if="items.isHeight==true">
											<image src="@/static/bj/icon_edzg.png" mode="heightFix">
											</image>
										</view>

									</view>


								</view>
							</uni-collapse-item>
						</view>
					</uni-collapse>

				</view>

			</view>
			<!-- v-if="isMsg" -->
			<view class="">
				<view style="background: #ffffff;border-radius: 10px;">
					<view class="form-list-head form-list-headBj dis" style="margin-top: 24rpx;">
						<view class="form-list-head-msg dis">
							<view class="form-list-head-msg-left">您的基础信息</view>
							<!-- <view class="form-list-head-msg-right">ss</view> -->
						</view>

					</view>
					<view class="msg-wrap">
						<view class="msg-wrap-msg" style="border-bottom: 2rpx solid rgba(0,0,0,0.06);">
							<view class="msg-wrap-left">姓名</view>
							<view class="msg-wrap-right">
								<input type="text" disabled placeholder-style="color:#C3C3C3" maxlength="10"
									v-model="form.name" placeholder="请输入真实姓名" />

							</view>
						</view>
						<view class="msg-wrap-msg" style="border-bottom: 2rpx solid rgba(0,0,0,0.06);">
							<view class="msg-wrap-left">年龄</view>
							<view class="msg-wrap-right">
								<input type="number" disabled placeholder-style="color:#C3C3C3" maxlength="2"
									v-model="form.age" placeholder="请输入真实年龄" />

							</view>
						</view>

						<view class="msg-wrap-msg" style="border-bottom: 2rpx solid rgba(0,0,0,0.06);">
							<view class="msg-wrap-left">性别</view>
							<view class="msg-wrap-right msg-wrap-rightxb dis">
								<view :class="ightxb==1?'ightxbActive':''">男</view>
								<view :class="ightxb==2?'ightxbActive':''">女</view>

								<!-- <uni-easyinput placeholder="请输入身份证号"></uni-easyinput> -->
							</view>
						</view>
						<view class="msg-wrap-msg">
							<view class="msg-wrap-left">当前居住城市</view>
							<view class="msg-wrap-right">
								<view class="">
									<text class="msg-wrap-right-text">

										{{form.cityName}}

									</text>
								</view>

							</view>
						</view>
					</view>


				</view>
				<view class="des">
					<view>-嘉会通为您提供借款推荐服务-</view>
					<view>我们不为在校学生提供任何助贷信息服务</view>

				</view>
				<view class="gobutton" @click="loginclick">
					<text>再次申请</text>
				</view>
				<view style="height: 200rpx;">

				</view>
			</view>




			<!-- <view class="gobutton" @click="loginclick">
				<text>立即申请</text>
			</view> -->
		</view>



		<uni-popup ref="popcity" type="bottom" border-radius="10px 10px 0 0">
			<view style="height: 800rpx; background-color: #FF4F01;">
				<city-select @cityClick="cityClick" :formatName="formatName" :activeCity="activeCity" :hotCity="hotCity"
					:obtainCitys="obtainCitys" :isSearch="true" ref="citys"></city-select>
			</view>
		</uni-popup>
		<uni-popup ref="fff" type="bottom" border-radius="10px 10px 0 0">

		</uni-popup>
		<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0" :mask-click="false">
			<view style=" height: 800rpx; background-color: blanchedalmond; display: flex; ">
				<!-- <loading /> -->
			</view>
		</uni-popup>

		<uni-popup ref="surePage" type="bottom" border-radius="10px 10px 0 0" :mask-click="false">
			<view
				style="height: 90vh;overflow: scroll; background: linear-gradient( 180deg, #1977FB 0%, #F3F4F5 45%);border-radius: 20rpx 20rpx 0 0;">
				<sure :type="sureType" @surePageClick="surePageClick" :sure2Data="sure2Data" @closeSuer="closeSuer" />
			</view>
		</uni-popup>
		<uni-popup ref="surePageLj" type="center" :is-mask-click="false" border-radius="10px 10px 0 0">
			<view class="backAffirm-wrap" style="padding: 20rpx 0;height: 630rpx;width: 600rpx;">
				<view class="backAffirm-wrap-heard1">
					<image src="@/static/bj/icon_ljP.png" mode=""></image>

					<!-- <image src="@/static/index/icon_close.png" mode=""></image> -->
				</view>
				<view class="backAffirm-wrap-des1">
					-专属额度审批已出-
				</view>
				<view class="backAffirm-wrap-price">

					<text class="backAffirm-wrap-price-left">￥</text>
					<text class="backAffirm-wrap-price-right">20000</text>


				</view>

				<view class="backAffirm-wrap-ts1">
					<view>立即领取会专属借款额度</view>
					<view>今日内有效</view>


				</view>

				<view class="backAffirm-wrap-btn" style="width: 80%;" @click="goPage('/pagesC/list/index')">
					立即领取额度
				</view>
				<view class="backAffirm-wrap-close1" @click="closeBackAffirm">
					<image src="@/static/index/icon_gb.png" mode=""></image>
				</view>
			</view>

		</uni-popup>
		<uni-popup ref="backAffirm" type="center" border-radius="10px 10px 0 0">
			<view class="backAffirm-wrap">
				<view class="backAffirm-wrap-heard">
					<image src="@/static/index/icon_jb.png" mode=""></image>
					<!-- <image src="@/static/index/icon_close.png" mode=""></image> -->
				</view>
				<view class="backAffirm-wrap-des">
					您可能会错过以下权益
				</view>

				<view class="backAffirm-wrap-list">

					<view class="backAffirm-wrap-list-msg" v-for="(item,index) in backAffirmList" :key="index">
						<image class="backAffirm-wrap-list-msg-img" :src="item.url" mode=""></image>
						<view class="backAffirm-wrap-list-msg-msg">{{item.msg}}</view>
					</view>

				</view>
				<view class="backAffirm-wrap-ts">
					信息加密存储仅用于资质申请，平台承诺不会泄露您的任何信息。
				</view>

				<view class="backAffirm-wrap-btn" @click="goPage('/pagesC/list/index')">
					立即申请
				</view>
			</view>
			<view class="backAffirm-wrap-close" @click="closeBackAffirm">
				<image src="@/static/index/icon_gb.png" mode=""></image>
			</view>
		</uni-popup>
	</view>



</template>

<script>
	import {
		saveV5,
		surePush,
		authorizeAgain,
		clickChannel,
	} from '@/api/index.js'
	import Notice from '@/components/jk-notice/index.vue'
	import baseApi from '../../config/index.config.js';
	import xyDialog from '@/components/xy-dialog/xy-dialog.vue';
	import citySelect from "@/components/city-select/city-select.vue"
	import citys from './citys.js'
	import sure from '@/pagesA/form/com/compornent/sure/index.vue'

	export default {
		components: {
			Notice,

			citySelect,
			sure
		},
		data() {
			return {
				ightxb: 1,

				heightTop: '',
				isMsg: false,
				sure2Data: {},
				percent: 2,
				form: {
					age: '',
					sex: '1',
					"cityName": "杭州市",
					// "gender": "",
					"carProduction": "",
					"houseProperty": "",
					"sesamePoints": "",
					"accumulationFund": '',
					// "commercialInsurance": '',
					"socialSecurity": '',
					// "creditStatus": '',
					name: '',


				},
				closeZcxxAcitveHeight: '',
				closeZcxxAcitveBjt: "https://oss.jht.jht.cash/img/20250429/zIiV9OBw.png",

				closeZcxxAcitve: false,
				noticeContent: '请写真实信息通过率更高！',


				backAffirmList: [{
						url: '@/static/index/icon_tag1.png',
						msg: '以匹配产品的申请机会'
					},
					{
						url: '@/static/index/icon_tag2.png',
						msg: '初审已通过，确认额度立即提现'
					},
					{
						url: '@/static/index/icon_tag3.png',
						msg: '优质信贷经理专属服务'
					}
				],
				channelId: "",
				productData: {},
				token: "",
				activeCity: {
					cityCode: 110100,
					cityName: '杭州市'
				},
				formatName: "cityName",
				hotCity: [{
						cityName: '北京市',
						cityCode: 110102
					}, {
						cityName: '广州市',
						cityCode: 110102
					}, {
						cityName: '南京市',
						cityCode: 110100
					},
					{
						cityName: '苏州市',
						cityCode: 110102
					},
					{
						cityName: '无锡市',
						cityCode: 110102
					}, {
						cityName: '济南市',
						cityCode: 110100
					}, {
						cityName: '青岛市',
						cityCode: 110100
					}, {
						cityName: '南通市',
						cityCode: 110100
					}, {
						cityName: '杭州市',
						cityCode: 110100
					}, {
						cityName: '重庆市',
						cityCode: 110100
					}, {
						cityName: '成都市',
						cityCode: 110100
					}, {
						cityName: '武汉市',
						cityCode: 110100
					}, {
						cityName: '合肥市',
						cityCode: 110100
					}, {
						cityName: '昆明市',
						cityCode: 110100
					},
				],
				obtainCitys: citys,
				phone: "",
				value: '杭州',
				title: "",
				sureType: 1,
				windowHeight: "",
				requestData: {
					"name": "",
					"age": "",
					"cityName": "",
					"gender": "",
					"carProduction": "",
					"houseProperty": "",
					"sesamePoints": "",
					"accumulationFund": 1,
					"commercialInsurance": 1,
					"socialSecurity": 1,
					"creditStatus": 1
				},
				list1: [{
					open: true,
					"index": 0,
					"title": "房产情况",
					flag: 0,
					percent: 22,
					selectData: {
						"title": ""
					},
					"field": "houseProperty",
					active: null,
					"content": [{
							price: 80000,
							"title": "有房",
							"field": "houseProperty",
							"value": '1',
							"select": false,
							"empty": false,
							"hot": false,
							isHeight: true
						},
						{
							price: 7000,
							"title": "无房",
							"field": "houseProperty",
							"value": '0',
							"select": false,
							"empty": false,
							"hot": false,
							isHeight: false
						},
					]
				}],
				list: [{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "房产情况",
						flag: 0,
						percent: 22,
						active: null,
						"field": "house",
						"content": [{
								price: 80000,
								"title": "有房",
								"field": "house",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 7000,
								"title": "无房",
								"field": "house",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "车产情况",
						flag: 0,
						active: null,
						"field": "car",
						percent: 40,
						"content": [{
								price: 30000,
								"title": "有车",
								"field": "car",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 7000,
								"title": "无车",
								"field": "car",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "公积金缴纳",
						flag: 0,
						percent: 60,
						"field": "accumulationFund",
						active: null,
						"content": [{
								price: 20000,
								"title": "12个月以上",
								"field": "accumulationFund",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "6-12月",
								"field": "accumulationFund",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "6个月以下",
								"field": "accumulationFund",
								"value": '2',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "无公积金",
								"field": "accumulationFund",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},



						]
					},
					{
						selectData: {
							"title": "",
						},
						open: true,
						"index": 0,
						"title": "社保情况",
						flag: 0,
						percent: 70,
						active: null,
						"field": "socialSecurity",
						"content": [{
								price: 20000,
								"title": "12个月以上",
								"field": "socialSecurity",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "6-12月",
								"field": "socialSecurity",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "6个月以下",
								"field": "socialSecurity",
								"value": '2',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "无社保",
								"field": "socialSecurity",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},



						]
					},
					{
						selectData: {
							"title": "",
						},
						active: null,
						open: false,
						"index": 1,
						flag: 1,
						"title": "芝麻分",
						percent: 90,
						"field": "sesamePoints",
						"content": [{
								price: 20000,
								"title": "700分以上",
								"field": "sesamePoints",
								"value": '5',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 13000,
								"title": "650-700分",
								"field": "sesamePoints",
								"value": '4',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 13000,
								"title": "600-649分",
								"field": "sesamePoints",
								"value": '4',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 10000,
								"title": "600分以下",
								"field": "sesamePoints",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							// {
							// 	price: 7000,
							// 	"title": "无",
							// 	"field": "sesamePoints",
							// 	"value": '0',
							// 	"select": false,
							// 	"empty": false,
							// 	"hot": false,
							// 	isHeight: false
							// },


						]
					},

					{
						selectData: {
							"title": "",
						},
						active: null,
						open: false,
						flag: 1,
						"index": 2,
						percent: 100,
						"title": "职业",
						"field": "company",
						"content": [{
								price: 40000,
								"title": "民营企业主",
								"field": "company",
								"value": '0',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: true
							},
							{
								price: 30000,
								"title": "公务员/事业单位",
								"field": "company",
								"value": '1',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 13000,
								"title": "上班族",
								"field": "company",
								"value": '2',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},
							{
								price: 7000,
								"title": "自由职业",
								"field": "company",
								"value": '3',
								"select": false,
								"empty": false,
								"hot": false,
								isHeight: false
							},

						]
					},
					// {
					// 	active: null,
					// 	open: false,
					// 	flag: 1,
					// 	"index": 3,
					// 	"title": "车产信息",
					// 	"content": [{
					// 			"title": "有",
					// 			"field": "carProduction",
					// 			"value": '1',
					// 			"select": false,
					// 			"empty": false,
					// 			"hot": false,
					// 		},
					// 		{
					// 			"title": "无",
					// 			"field": "carProduction",
					// 			"value": '0',
					// 			"select": false,
					// 			"empty": false,
					// 			"hot": false,
					// 		},
					// 	]
					// }
				],
				allPrice: 0,
				userInfo: {},
				showPupType: null,
				activeNames: [],
			}
		},
		onShow() {
			let data = {
				name: '老用户留资页',
				age: "23"
			}
			this.$ymmd(data)
		},
		onLoad(option) {
			this.openData()
			this.obtainvalue();
			this.loaction();
			this.token = this.obtainuser();
			this.obtainphone();

			if (option.type) {
				this.type = option.type
				this.userInfo = JSON.parse(decodeURIComponent(option.userInfo));
			}

			this.list.map(resw => {

				if (resw.content.length == 2) {
					resw.heightTop = "top:-39%"
					// console.log("走2和")
					// this.heightTop="top:-39%"
				} else {
					resw.heightTop = "top:-49%"
					// console.log("走22和")
					// this.heightTop="top:-49%"

				}
			})
			this.hx()
			this.loginclick()
		},
		onBackPress(options) {
			let that = this
			that.$nextTick(() => {

				that.$refs.backAffirm.open()
			})
			return true;
		},
		methods: {
			openData() {
				let lll = []
				this.list.map((res, index) => {
					lll.push(index)
				})
				this.activeNames = lll

			},
			hx() {
				console.log(this.userInfo, 'this.userInfo')
				this.form.cityName = this.userInfo.cityName
				this.form.age = this.userInfo.age
				this.form.sex = this.userInfo.gender
				this.ightxbBtn(this.userInfo.gender)
				this.form.name = this.userInfo.userName
				this.list.map(res => {

					res.content.map((rrr, indexrrr) => {
						// console.log(res.field== 'company','鑫')
						if (res.field == 'house') {
							if (this.userInfo.house == rrr.value) {
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title
							}
						}
						if (res.field == 'car') {
							if (this.userInfo.car == rrr.value) {
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title

							}
						}
						if (res.field == 'accumulationFund') {
							if (this.userInfo.accumulationFund == rrr.value) {
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title
							}
						}
						if (res.field == 'socialSecurity') {
							if (this.userInfo.socialSecurity == rrr.value) {
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title
							}
						}
						if (res.field == 'sesamePoints') {

							if (this.userInfo.sesamePoints == rrr.value) {
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title
							}
						}
						if (res.field == 'company') {

							if (this.userInfo.company == rrr.value) {
								console.log(rrr, 'rrr')
								res.active = indexrrr
								this.allPrice += rrr.price
								res.selectData.title = rrr.title
							}
						}

					})


				})
				console.log(this.list, '是否变了')
			},

			// 选择男女
			ightxbBtn(index) {
				this.ightxb = index
				this.form.sex = index
			},
			// 关闭资产信息
			closeZcxx() {
				this.closeZcxxAcitve = !this.closeZcxxAcitve
				if (this.closeZcxxAcitve == true) {
					this.closeZcxxAcitveBjt = "https://oss.jht.jht.cash/img/20250506/jJDBBCS6.png"
					this.closeZcxxAcitveHeight = '100rpx'
				} else {
					this.closeZcxxAcitveBjt = "https://oss.jht.jht.cash/img/20250429/zIiV9OBw.png"
					this.closeZcxxAcitveHeight = ''
				}

			},
			checkMsg(item, index, items, indexs) {

				//item  外面的对象 items   里面选择的

				// 赋值改变的
				this.$set(item, 'active', indexs)


				this.list.map(res => {
					// item.title=res.title
					// console.log(items,'items')
					if (res.title == item.title && this.list.length != this.list1.length) {
						console.log('这是啥')
						this.percent += 10
						item.open = false
						this.list1.push(this.list[index + 1])
						this.list1[index + 1].open = true
					}

				})
				item.selectData = items
				// item.selectData.title=":"+item.selectData.title
				// console.log(this.list1[index].title="芝麻分",'this.list1[index]')

				this.percent = item.percent

				if (this.list1[5] && this.list1[5].selectData && this.list1[5].selectData.value) {
					// this.ts("请选择芝麻分")

					this.isMsg = true
					this.closeZcxx()
					this.scrollToPosition()
					// return;
				}

				// if(this.list1[index].title="芝麻分"){
				// 	console.log(this.list1[index].selectData.value,'zhes')
				// 	if(this.list1[index].selectData.value){
				// 		console.log("芝麻分选中之后的")
				// 		this.isMsg=true
				// 	}

				// }


				this.calculate()

				// item.title=item.title+':'+item.selectData.title
			},

			scrollToPosition() {

				uni.pageScrollTo({
					selector: "#jcxx",
					scrollTop: 300,
					duration: 300,
					success(e) {
						console.log(e, 'sss')
					}
				});
			},
			calculate() {

				// this.allPrice = this.list1.reduce((sum, item) => sum + item.price, 0);
				// console.log(this.allPrice,'this.allPrice')
				// return;

				this.allPrice = 0
				this.list1.map(res => {

					if (res.selectData && res.selectData.price) {

						this.allPrice += res.selectData.price
					}

				})
				console.log(this.allPrice, 'this.allPrice')
				// console.log(this.list1,'this.list1')
			},
			closeBackAffirm() {
				this.$refs.backAffirm.close()
				this.$refs.surePageLj.close()

			},
			closeSuer() {
				this.$refs.surePage.close()
				this.$refs.surePageLj.open()

			},
			async surePageClick(value) {
				this.$ymmdBtn("ymBtnPush", {
					name: '点击推送'
				})
			
				// 确定按钮
				// 0 机构
				// 1平台
				let data = {
					id: this.sure2Data.id,
					sure: 0
				}
				let res = await surePush(data)
				console.log(res, "我爱你")
				if (res) {
					console.log("我爱你")
					uni.navigateTo({
						url: '/pagesC/list/index'
					})
				}
				if (res.code == 100000) {
					let ooData = {
						type: 9
					}
					let oo = await clickChannel(ooData)

				}
			},
			obtainphone() {
				var paraString = window.location.href
				var c = paraString.split('&p=')
				if (c.length > 1) {
					this.phone = decodeURI(c[1])

				}
			},
			obtainvalue() {
				var paraString = window.location.href
				var c = paraString.split('?')

				if (c.length > 1) {
					var b = c[1]

					var d = b.split('#')

					if (d.length > 1) {

						var e = d[0].split('=')

						if (e.length > 1) {

							var e = e[1].replace(' ', '')
							var f = e.split('&')
							if (f.length > 1) {
								this.channelId = f[0].replace(' ', '')
							} else {
								this.channelId = e
							}

						} else {
							this.channelId = ''
						}
					} else {
						this.channelId = ''
					}

				} else {
					this.channelId = ''
				}
			},
			obtainuser() {
				var paraString = window.location.href
				var c = paraString.split('&')
				for (let i = 0; i < c.length; i++) {
					if (c[i].indexOf("token") != -1) {
						var d = c[i].split("=")
						if (d.length > 1) {
							return d[1]
						}
					}
				}
				return 0

			},
			cityClick(item) {

				this.form.cityName = item.cityName;
				this.$refs.popcity.close()
			},
			chooseCity() {
				this.$refs.popcity.open('bottom')
			},
			loaction() {
				uni.getLocation({
					type: 'wgs84',
					success: function(res) {
						console.log('当前位置的经度：' + res.longitude);
						console.log('当前位置的纬度：' + res.latitude);
						let url =
							"https://restapi.amap.com/v3/geocode/regeo?key=ebab6dbb6d7f4f2bccb3c0bb4adabc2b&location=" +
							res.longitude + "," + res.latitude + "&radius=1000&extensions=all&roadlevel=0";
						uni.request({
							url: url,
							method: 'POST',
							success(res) {
								console.log("=====")
								console.log(res)
								console.log("=====")
							},
							fail(error) {

							}
						})
					}
				});
			},
			ageinputClick(value) {
				this.requestData['age'] = value.detail.value
			},
			nameinputClick(value) {
				this.requestData['name'] = value.detail.value
			},
			cellClick(value, index, k) {
				let contests = this.list[index]['content'];
				for (let i = 0; i < contests.length; i++) {
					if (i == k) {
						contests[i]['select'] = true;
						this.requestData[contests[i]['field']] = contests[i]['value'];
					} else {
						contests[i]['select'] = false;
					}

				}
			},
			isValidIDCard(id) {
				const regex18 = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))((0[1-9])|([1-2][0-9])|30|31)\d{3}[\dX]$/i;
				const regex15 = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/;
				return regex18.test(id) || regex15.test(id);
			},
			async loginclick() {

				let ress = await authorizeAgain()


				if (ress.code == 100000) {
					let ooData = {
						type: 11
					}
					let oo = await clickChannel(ooData)
					if (ress.data) {
						if (ress.data.page == 'list') {

							this.goPage('/pagesC/list/index')
						} else if (ress.data.page == 'sure1') {

							this.sure2Data = ress.data

							this.$refs.surePage.open()
						} else if (ress.data.page == 'sure2') {

							this.sure2Data = ress.data

							this.$refs.surePage.open()

						} else if (ress.data.page == "end") {
							this.goPage('/pagesE/result/index')
							// url = ``;
						}
					}




				} else {
					console.log("错么嘛")

				}








				// console.log(ress, '我是撒')
				// if (ress.code == 100000) {
				// 	let ooData = {
				// 		type: 11
				// 	}
				// 	let oo = await clickChannel(ooData)

				// }
				// if (ress.data.page == 'list') {
				// 	this.goPage('/pages/list/index')
				// } else if (ress.data.page == 'sure1') {
				// 	this.sure2Data = ress.data
				// 	this.$refs.fff.close()
				// 	uni.hideLoading();
				// 	this.$refs.surePage.open()
				// } else if (ress.data.page == 'sure2') {
				// 	this.goPage('/pagesD/organization/index?id=' + ress.data.id)
				// }



				return;
				// 假数据
				// let ress = {
				// 	data: {
				// 		accountName: "张三平台",
				// 		decs: "嗡嗡嗡",
				// 		id: "12",
				// 		logo: "http://pic1.arkoo.com/56D0B40F99F841DF8A2425762AE2565D/picture/o_1i4qoovi8rn8ras12sn63lgpo1im.jpg",
				// 		page: "suer2",
				// 		platformName: "平台机构",
				// 		platformProName: "平台机构公司",
				// 		productName: "产品名称",
				// 		protocolUrl: "www.taobao.com",
				// 		title: "标题什么贷款",
				// 	}
				// }
				// this.showPupType = 1
				// this.sure2Data = ress.data
				// this.$refs.fff.close()
				// uni.hideLoading();
				// this.$refs.surePage.open()
				// return;
				if (this.list1[0].selectData && !this.list1[0].selectData.value) {
					this.ts("请选择房产情况")
					return;
				} else if (this.list1[1].selectData && !this.list1[1].selectData.value) {
					this.ts("请选择车产情况")
					return;
				} else if (this.list1[2].selectData && !this.list1[2].selectData.value) {
					this.ts("请选择公积金情况")
					return;
				} else if (this.list1[3].selectData && !this.list1[3].selectData.value) {
					this.ts("请选择社保情况")
					return;
				} else if (this.list1[4].selectData && !this.list1[4].selectData.value) {
					this.ts("请选择芝麻分")
					return;
				} else if (this.list1[5].selectData && !this.list1[5].selectData.value) {
					this.ts("请选择职业")
					return;
				} else if (this.form.name == '') {
					this.ts("请填写姓名")
					return;
				} else if (this.form.age == '') {
					this.ts("请填写年龄")
					return;
				}

				this.form.houseProperty = this.list1[0].selectData.value
				this.form.carProduction = this.list1[1].selectData.value
				this.form.accumulationFund = this.list1[2].selectData.value
				this.form.socialSecurity = this.list1[3].selectData.value
				this.form.sesamePoints = this.list1[4].selectData.value
				this.$refs.fff.open()
				uni.showLoading({
					mask: true,
					title: "正在匹配中,请稍后..."
				})

				let res = await saveV5(this.form)
				console.log(res, 'res')
				if (res.code == 100000) {
					let ooData = {
						type: 11
					}
					let oo = await clickChannel(ooData)
					if (res.data) {
						if (res.data.page == 'list') {
							this.goPage('/pagesC/list/index')
						} else if (res.data.page == 'sure1') {
							this.showPupType = 1
							this.sure2Data = res.data
							this.$refs.fff.close()
							uni.hideLoading();
							this.$refs.surePage.open()
						} else if (res.data.page == 'sure2') {
							this.showPupType = 2
							this.sure2Data = res.data
							this.$refs.fff.close()
							uni.hideLoading();
							this.$refs.surePage1.open()

						} else if (res.data.page == "end") {
							url = `/pagesE/result/index`;
						}
					}




				} else {
					console.log("错么嘛")
					this.$refs.fff.close()
					uni.hideLoading();
				}


				return;
				// this.goPage('/pages/list/index')
				// return;
				let a = null;
				this.$refs.fff.open()
				uni.showLoading({
					mask: true,
					title: "正在匹配中,请稍后..."
				})
				setTimeout(() => {
					a = 2
					console.log("走了吗啊")
					if (a == 1) {} else if (a == 2) {

					} else if (a == 3) {
						this.goPage('/pagesC/list/index')
					}
				}, 2000);



				return;
				// 提交信息
				// 弹出层 loading  当有结果的时候
				// 机构 api 授权按钮点击

				let data = this.requestData;
				var msg = "";
				for (const key in data) {
					switch (key) {
						case "name":
							if (data[key].length == 0) {
								msg = "请输入姓名";
							}
							break;
						case "age":
							if (data[key].length == 0) {
								msg = "请输入年龄";
							}
							break;
						case "cityName":
							if (data[key].length == 0) {
								msg = "请选择城市";
							}
							break;
						case "gender":
							if (data[key].length == 0) {
								msg = "请选择性别";
							}
							break;
						case "carProduction":
							if (data[key].length == 0) {
								msg = "请选择车产信息";
							}
							break;
						case "houseProperty":
							if (data[key].length == 0) {
								msg = "请选择房产信息";
							}
							break;
						case "sesamePoints":
							if (data[key].length == 0) {
								msg = "请选择芝麻分";
							}
							break;
						default:
							break;
					}
				}

				if (msg.length == 0) {
					// loading
					this.$refs.popup.open('bottom')
					let phoneStr = this.phone
					let that = this
					uni.request({
						// timeout: 3000,
						header: {
							"token": this.token,
							'channeid': that.channelId,
							'platform': "H5-" + uni.getSystemInfoSync().platform
						},
						url: baseApi.baseUrl + '/userInfo/saveV5',
						data: this.requestData,
						dataType: 'json',
						method: 'POST',
						success(res) {
							that.$refs.popup.close()
							if (res.data.code != 100000) {
								console.log(res.data.code)
								uni.navigateTo({
									url: "/pagesC/list/index?channelId=" + that.channelId +
										"&token=" + that.token + "&p=" + phoneStr
								})
								return
							}
							uni.request({
								header: {
									'channeid': that.channelId,
									'platform': "H5-" + uni.getSystemInfoSync().platform
								},
								url: baseApi.baseUrl + '/clickChannel',
								method: 'POST',
								data: {
									"mobile": phoneStr,
									"type": 11
								},
								dataType: 'json',
							})

							if (res.data.data.page == "sure1") {
								that.sureType = 1
								that.$refs.surePage.open('bottom')
								that.productData = res.data.data
							} else if (res.data.data.page == "sure2") {
								that.sureType = 2
								that.$refs.surePage.open('bottom')
								that.productData = res.data.data
							} else if (res.data.data.page == "list") {
								uni.navigateTo({
									url: "/pagesC/list/index?channelId=" + that.channelId +
										"&token=" + that.token + "&p=" + phoneStr
								})
							} else if (res.data.data.page == "end") {
								url = `/pagesE/result/index`;
							}
							console.log()

						},
						fail(fail) {
							that.$refs.popup.close()
							uni.showToast({
								title: "提交失败"
							})
						}
					})
				} else {
					uni.showToast({
						title: msg
					})
				}

			},
			ts(tit) {
				uni.showToast({
					title: tit,
					icon: "none"
				})
			},
			goPage(url) {
				uni.navigateTo({
					url
				})
			},
		}
	}
</script>

<style lang="scss">
	.ai {
		align-items: center;
	}

	page {
		background: #F3F4F5;
	}

	.des {
		color: #999999;
		font-size: 24rpx;
		margin: 16rpx 0;
		text-align: center;
	}

	.msg-wrap {
		padding-bottom: 20rpx;
	}

	.msg-wrap-msg {
		padding: 20px;

		display: flex;
		align-items: center;

		.msg-wrap-left {
			font-weight: 500;
			width: 30%;
			font-size: 28rpx;
			color: #333;
		}

		.msg-wrap-rightxb {
			justify-content: flex-end;

			view {
				width: 154rpx;
				height: 62rpx;
				background: #F1F8FF;
				border-radius: 12rpx;
				text-align: center;
				line-height: 62rpx;
				color: #C3C3C3;
				margin-left: 20rpx;
			}
		}

		.msg-wrap-right {
			text-align: right;

			input {
				font-size: 28rpx;
				text-align: right;
			}

			width: 70%;

			.msg-wrap-right-text {
				.msg-wrap-right-text-jt {
					// font-size: ;
					margin: 0 20rpx 0 6rpx;
				}

				font-size: 44rpx;
				color: $mian-color;
				font-weight: 500;
			}
		}
	}

	// /deep/.uni-collapse-item__wrap {
	// 	height: 100%!important;
	// }

	.acctive {
		border: 4rpx solid $mian-color !important;
		color: $mian-color !important;
	}

	.sfqtag-wrap1 {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 45%;
		position: relative;
	}

	.sfqtag-wrap {
		flex-wrap: wrap;
		// min-height: 160rpx;
		justify-content: space-around;
		// position: relative;
		// margin: 20px 0;

		// justify-content: space-around;
		.sfqtag {
			background: #F1F8FF;
			border-radius: 4rpx;
			// width: 100%;
			width: 280rpx;
			text-align: center;
			line-height: 80rpx;
			color: #333333;
			height: 80rpx;
			border-radius: 12rpx;
			margin-bottom: 20rpx;
		}

		.sfqtagImg {
			position: absolute;
			top: -37%;
			z-index: 10;
			right: 9%;

			width: 98rpx;
			height: 50rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.form-list-headBj {
		height: 100rpx;
		background-image: url("https://oss.jht.jht.cash/img/20250506/jJDBBCS6.png");
	}

	.form-list-head {
		.form-list-head-msg-close {
			width: 20%;
			line-height: 75rpx;
			text-align: right;
		}

		.form-list-head-msg {
			// align-items: center;
			width: 80%;
			padding: 12rpx 16rpx;

			.form-list-head-msg-left {
				width: 45%;
				color: #fff;
				font-size: 32rpx;
				// border: 1px solid red;

			}

			.form-list-head-msg-right {
				width: 60%;
				font-family: 'PingFang SC, PingFang SC';
				// padding-left: 52rpx;
				color: $mian-color;

			}
		}

		justify-content: space-between;
		// align-items: center;
		padding: 0 20rpx 0 0;

		background-size: 100% 100%;
		// border-radius:40rpx 40rpx 40rpx 0;
		margin-top: -74rpx;
	}

	/deep/.uni-progress-inner-bar {
		border-radius: 200px;
	}

	/deep/.uni-progress-bar {
		height: 10px !important;
		border-radius: 100px !important;
	}

	.form-des {
		.form-des-msg {
			margin-top: 58rpx;
			line-height: 60rpx;
		}

		.form-head3 {
			margin-bottom: 30rpx;
		}

		.form-head1 {
			font-size: 50rpx;
			// margin-top: 30rpx;
			// margin-bottom: 10rpx;
			font-weight: 500;
		}

		.form-head2 {
			font-size: 64rpx;
			// margin-top: 30rpx;
			// margin-bottom: 10rpx;
			font-weight: 500;
		}

		.form-head1 {
			font-size: 28rpx;
		}

		// width: 100%;
		color: #ffffff;
		background-image: url(@/static/bj/icon_xxhead.png);
		// background-color: $mian-color;
		background-size: 100% 100%;
		border-radius: 20rpx;
		height: 280rpx;
		margin: 20rpx 0 0 0;
		padding: 0 38rpx;
		display: flex;
		flex-direction: column;
		// justify-content: space-evenly;
	}

	.backAffirm-wrap-close1 {
		width: 60rpx;
		height: 60rpx;
		margin: 100rpx auto auto auto;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.backAffirm-wrap-close {
		width: 60rpx;
		height: 60rpx;
		margin: 50rpx auto auto auto;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.backAffirm-wrap {
		.backAffirm-wrap-list {
			.backAffirm-wrap-list-msg {
				.backAffirm-wrap-list-msg-img {
					width: 32rpx;
					height: 32rpx;
					vertical-align: center;
				}

				.backAffirm-wrap-list-msg-msg {
					font-size: 30rpx;
					margin-left: 20rpx;
				}

				display: flex;
				align-items: center;
				margin: 30rpx;
			}

			width: 80%;
			padding:4rpx 36rpx;
			margin: 0 auto;
			background: #EBF3FF;
			border-radius: 20rpx;
		}

		.backAffirm-wrap-btn {
			background: linear-gradient(90deg, #6CB0F2 0%, #3C75F2 100%);
			box-shadow: 0px 8rpx 15px 2px #B2CBEA;
			border-radius: 100rpx;
			width: 60%;
			margin: 20rpx auto auto auto;
			line-height: 80rpx;
			text-align: center;
			color: #ffffff;
			font-size: 30rpx;

		}

		.backAffirm-wrap-ts1 {
			font-size: 28rpx;
			color: #999999;
			text-align: center;
		}

		.backAffirm-wrap-ts {
			color: #999999;
			font-size: 26rpx;
			width: 80%;
			margin: 30rpx auto;
		}

		.backAffirm-wrap-price {
			display: flex;
			align-items: center;
			justify-content: center;

			.backAffirm-wrap-price-left {
				font-weight: 500;
				font-size: 48rpx;
				color: $mian-color;
			}

			.backAffirm-wrap-price-right {
				font-weight: bold;
				font-size: 100rpx;
				color: $mian-color;
			}
		}

		.backAffirm-wrap-des1 {
			color: #333;
			font-size: 30rpx;
			text-align: center;
			padding: 20rpx;
		}

		.backAffirm-wrap-des {
			color: $mian-color;
			font-size: 32rpx;
			text-align: center;
			padding: 40rpx;
		}

		.backAffirm-wrap-heard1 {
			width: 200rpx;
			height: 200rpx;
			margin: 0 auto;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.backAffirm-wrap-heard {
			width: 100%;
			height: 150rpx;
			background-image: url('@/static/index/icon_close.png');
			background-size: 100% 100%;
			text-align: right;

			image {
				width: 200rpx;
				height: 200rpx;
				margin: -60rpx -16rpx 0 0;


			}
		}

		height: 800rpx;
		width: 690rpx;
		border-radius: 20rpx;
		background-color: #ffffff;
	}

	.cell_select {
		padding: 10rpx;
		background-color: #FFEAE0;
		border-radius: 25rpx;
		box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(43, 83, 230, 0.21);
	}

	.cell_noselect {
		padding: 10rpx;
		background-color: #ffffff;
		border-radius: 25rpx;
		box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(43, 83, 230, 0.21);
	}

	.cell_noshow {
		padding: 10rpx;
		border-radius: 25rpx;
		background-color: #ffffff;
		background-color: #FFEAE0;
	}

	.gobutton {
		background: linear-gradient(90deg, #6CB0F2 0%, #3C75F2 100%);
		box-shadow: 0px 4px 15px 2px #B2CBEA;
		border-radius: 48px 48px 48px 48px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin-left: 40rpx;
		margin-right: 40rpx;
		margin-bottom: 30rpx;
		margin-top: 20rpx;
		height: 90rpx;
		color: #ffffff;
		font-size: 35rpx;
		text-align: center;
		border-radius: 45rpx;
	}

	.ightxbActive {
		background: #6BAEF2 !important;
		color: #fff !important;
	}
</style>